Skip to content

[FLINK-39904] [table] Add SQL constructor and accessor functions for GEOGRAPHY#28788

Draft
davidchaava wants to merge 2 commits into
apache:masterfrom
akvelon:task/add-sql-geography-functions-clean
Draft

[FLINK-39904] [table] Add SQL constructor and accessor functions for GEOGRAPHY#28788
davidchaava wants to merge 2 commits into
apache:masterfrom
akvelon:task/add-sql-geography-functions-clean

Conversation

@davidchaava

Copy link
Copy Markdown

What is the purpose of the change

This pull request adds SQL constructor and accessor functions for the GEOGRAPHY
logical type introduced in #28740.

The functions provide conversion between GEOGRAPHY values and their WKT/WKB
representations. This PR is intended to be merged after #28740.

Jira: https://issues.apache.org/jira/browse/FLINK-39904
Discussion: https://lists.apache.org/thread/flbj8dfdfgs26klrxt7xch3r9785ky67

Brief change log

  • Added ST_GEOGFROMTEXT and ST_GEOGFROMWKB constructors for creating
    GEOGRAPHY values from WKT and WKB.
  • Added ST_ASTEXT and ST_ASWKB accessors for converting GEOGRAPHY values
    to WKT and WKB.
  • Added planner registrations and runtime implementations for the functions.
  • Added planner integration tests and runtime unit tests.

Verifying this change

This change added tests and can be verified as follows:

  • Added planner integration tests for WKT/WKB constructor and accessor functions.
  • Added runtime unit tests for valid values and invalid WKT/WKB input.

Does this pull request potentially affect one of the following parts:

  • Dependencies: no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths: yes
  • Anything that affects deployment or recovery: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? yes
  • If yes, how is the feature documented? docs

Follow-up changes

The following parts are intentionally left out of this PR:

  • PyFlink exposure for GEOGRAPHY schemas and functions.
  • Format-specific support, including Parquet integration.
  • Additional geospatial predicates and measurement functions beyond WKT/WKB
    constructor and accessor support.

@flinkbot

flinkbot commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@davidchaava
davidchaava force-pushed the task/add-sql-geography-functions-clean branch from 2c70190 to 567a66b Compare July 22, 2026 10:13
@davidchaava
davidchaava force-pushed the task/add-sql-geography-functions-clean branch from 567a66b to 4113af0 Compare July 22, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants